<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2014.07.14.
   家居公司装修案例列表($$)*/

!defined('Q_PATH') && exit;

class Anli_C_Controller extends InitController{

	public function index(){
		$arrJiajucompany=$this->_oParent->_arrJiajucompany;
		
		Core_Extend::getSeo($this,array(
			'title'=>"{$arrJiajucompany['jiajucompany_fullname']}网友案例",
			'keywords'=>"{$arrJiajucompany['jiajucompany_fullname']}网友案例",
			'description'=>"{$arrJiajucompany['jiajucompany_fullname']}网友案例",
		));

		// 案例列表
		$arrWhere=array();
		$arrWhere['jiajuanli_status']=1;
		$arrWhere['jiajucompany_id']=$arrJiajucompany['jiajucompany_id'];

		$nTotal=Model::F_('jiajuanli')->where($arrWhere)->getCounts();
		$oPage=Page::RUN($nTotal,25,Jiaju_Extend::getAnlipageUrl($arrJiajucompany,false));
		$arrAnlis=Model::F_('jiajuanli')
			->setColumns('jiajuanli_link,jiajuanli_title,jiajuanli_user,create_dateline')
			->where($arrWhere)
			->order('jiajuanli_id DESC')
			->limit($oPage->S(),$oPage->N())
			->getAll();

		$this->assign('arrAnlis',$arrAnlis);
		$this->assign('nTotalAnli',$nTotal);
		$this->assign('sPageNavbar',$oPage->P(array('id'=>'pagination','style'=>'li','current'=>'active')));
		$this->display(Jiaju_Extend::getTemplate($arrJiajucompany,'anli'));
	}

}
